unit uApartmentPlanning;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ToolWin, Grids, DBGridEh, StdCtrls;

type
  TfApartmentPlanning = class(TForm)
    GroupBox3: TGroupBox;
    DBGridEh1: TDBGridEh;
    tbApartmentPlanning: TToolBar;
    tbAddApartmentPlanning: TToolButton;
    tbDelApartmentPlanning: TToolButton;
    procedure tbAddApartmentPlanningClick(Sender: TObject);
    procedure tbDelApartmentPlanningClick(Sender: TObject);
    procedure DBGridEh1KeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fApartmentPlanning: TfApartmentPlanning;

implementation

uses uDBData;

{$R *.dfm}

procedure TfApartmentPlanning.tbAddApartmentPlanningClick(Sender: TObject);
begin
  fDBData.InsertRecord(fDBData.dApartmentPlanning);
end;

procedure TfApartmentPlanning.tbDelApartmentPlanningClick(Sender: TObject);
begin
  fDBData.DeleteRecord(fDBData.dApartmentPlanning);
end;

procedure TfApartmentPlanning.DBGridEh1KeyPress(Sender: TObject;
  var Key: Char);
begin
  if Key = #13 then (Sender as TDBGridEh).DataSource.DataSet.Post;
end;

end.
